import React from 'react';
import { PageContainer } from '@ant-design/pro-layout';
import { columnsIncomeLogItem } from '@/services/Column.d';
import ProTable from '@ant-design/pro-table';
import { queryIncomeLogList } from '@/services/incomeLog';

class incomeLog extends React.Component<any, any> {
  render() {
    return (
      <PageContainer>
        <ProTable<any>
          headerTitle="收益记录列表"
          rowKey={(record) => record.id}
          search={{
            labelWidth: 120,
          }}
          pagination={{
            showQuickJumper: true,
          }}
          dateFormatter="string"
          request={ async (params) => {
            let res: any = {};
            await queryIncomeLogList(params).then(v => {
              res = v;
              res.total = v.msg
            })
            return res;
          }}
          columns={columnsIncomeLogItem}
        />
      </PageContainer>
    );
  }
}

export default incomeLog;
